package java7;

import java.io.IOException;
import java.net.InetSocketAddress;
import java.nio.channels.ServerSocketChannel;
import java.nio.channels.SocketChannel;

/**
 * 同时捕获多个异常处理
 *
 * @author user
 */
public class J6 {
    public static void aa() throws ArithmeticException {

    }

    public static void main(String[] args) {
        try {
            ServerSocketChannel ssc = ServerSocketChannel.open();
            ssc.socket().bind(new InetSocketAddress("https://www.baidu.com", 80));
            ssc.configureBlocking(false);
            while (true) {
                SocketChannel sc = ssc.accept();
                aa();
            }
        } catch (ArithmeticException | IOException e1) {
            e1.printStackTrace();

        }

    }

}
